package com.jk.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jk.dto.SysMenu;
import com.jk.dto.TbAdmin;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;


public interface TbAdminMapper extends BaseMapper<TbAdmin> {
    @Update("update tb_admin set status = '1' where id = #{id}")
    void upstatus(TbAdmin tbAdmin);

    @Update("update tb_admin set status = '0' where id = #{id}")
    void updatestatus(TbAdmin tbAdmin);


    //通过用户id获得当前菜单集合
    List<SysMenu> findMenuListByuserId(@Param(value = "tbAdmin") TbAdmin tbAdmin,@Param(value = "parentId") Long parentId);
    //通过用户id获得当前权限集合
    List<String> selectPermsByUserId(Integer id);

}
